home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / documents / networking / ppp.config.irix < prev    next >
Encoding:
Text File  |  1994-08-02  |  15.1 KB  |  411 lines

  1.  
  2.                ~4Dgifts/toolbox/documents/networking/ppp.config.irix
  3.  
  4.  
  5.    this document was written by two sgi engineers to help people internally
  6.    establish ppp connections.  we include here as information useful to 
  7.    developers who may be attempting to crack the same "chinese puzzle"....
  8.  
  9.  
  10.  
  11.  
  12. $Revision: 1.5 $ 
  13.  
  14.     Establishing a PPP connection using IRIX PPP. 
  15.  
  16. A PPP connection extends our WAN to encompass nodes outside of
  17. the WAN connection. These nodes are typically remote locations
  18. such as your home or remote offices. By establishing a PPP
  19. connection, you can run applications that require a network
  20. connection such as mail, quote configurator, locate, etc. PPP
  21. connections works with high speed modems and ISDN lines.
  22. Connections using high speed modems (v.32, v.32bis, v.fast,
  23. etc..) are quite useable for file transfers and moderately active
  24. network applications such as the quote configurator and xrn.
  25. Don't expect to run intensive X-Window or graphics applications
  26. and display over the PPP link. NFS performance is also quite slow
  27. and not recomended.
  28.  
  29.  
  30. Requirements:
  31.  
  32.     OS/Hardware:    IRIX 5.2 with eoe1.sw.PPP installed and SGI
  33.             machines capable of at least 19.2k. Onyx/Challenge
  34.             machines may present problems. 4D25, 4D35, Indy,
  35.             Indigo, Indigo2 all work. Of course, you will
  36.             need two machines to make PPP work.
  37.  
  38.     Modem:        These are ones that I know works:
  39.  
  40.             Telebit Qblazer
  41.             Telebit Wordblazer
  42.             Telebit T3000
  43.             Telebit T2500 (v.32 only and be careful of firmware rev)
  44.             Practical Peripherial 14.4
  45.             US Robotics Sportster (has fax support as well) (*)
  46.                     
  47.             In general, any v.32bis with v.42 compress/error 
  48.             correction will do, the above is a result of 
  49.             personal experience.
  50.  
  51.             (*) recomended based on price, features, and 
  52.             personal experience
  53.  
  54.  
  55.  
  56.     Modem cable:    Use the SGI modem cable.  MacIntosh modem cable 
  57.             will NOT work. It lacks the correct pin-outs for 
  58.             hardware flow control (a requirement for PPP 
  59.             connections) Consult the "insight" (advanced 
  60.             site admin guide) for information on constructing 
  61.             the modem cable.
  62.  
  63.             ******WARNING********* 
  64.             The proper configuration of the modem cable is the 
  65.             most common problem most user have. PLEASE take EXTRA 
  66.             care to guarantee the cable meets the exact pinouts 
  67.             specified in the "Advanced site admin guide" for 
  68.             hardware supported "modem" cable.
  69.  
  70.  
  71.     Phone switches:    You may want to use a phone swich such as a
  72.             ASAP TF555. This allows you to use one
  73.             phone line for voice and modem connection.
  74.  
  75. Step 1:    Set up a modem.
  76.  
  77.     Hook up modem to serial port. I normally use port 2.
  78.  
  79.     Hook up phone line to modem.
  80.  
  81.     Run /etc/uucp/fix-telebit (or the appropriate initialization
  82.     script) for your modem. For example:
  83.  
  84. /usr/lib/uucp/fix-telebit -m WorldBlazer -s 38400 -io d2
  85.  
  86.     There may not be an initialization script in "/usr/lib/uucp" for 
  87.     your particular modem choice. This is no big deal. You will need 
  88.     to read your manual and the note the initial settings that will 
  89.     be best for your system (ie. set the modem to use hardware flow 
  90.     control, Lock the interface speed to the max allowed by your 
  91.     system (38400 or less), set the modem to request the appropriate 
  92.     speed for the PPP connection site (v.32 , v.32bis, v.fast, etc...),
  93.     set the modem to answer if desired, set the modem to use the 
  94.     compatible error correction and compression, etc....). Most modems 
  95.     allow you to do this by manualy setting PROM registers or 
  96.     flipping dip switches.  To access the modem to set the PROM registers 
  97.     you will need to establish serial communication with the modem. 
  98.     To do this use the UNIX "cu" command.
  99.  
  100.     You should see the response shown below. If you don't further
  101.     success is unlikely.  Check cabling and consult your modem
  102.     manual for a fix.  ( this is true for Telebit modems only).
  103.  
  104.  
  105. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  106.  
  107. hlo@sting #21 /usr/lib/uucp/fix-telebit -m WorldBlazer -s 38400 -io d2
  108.  
  109.   If this effort to program the Telebit "WorldBlazer"
  110.   connected to port 2 works, you should see a series AT commands
  111.   and responses.  The response to each command should end with 'OK'.
  112.   The last command should be followed by a list of all of the settings.
  113.  
  114.     Stopping processes currently using port 2
  115.  
  116. AT &F9 S254=255
  117. OK
  118. AT &F9 S254=255
  119. OK
  120. AT &F9 S254=255
  121. OK
  122. AT Q0 x12 &C1 &D3 L1 S2=128 S38=5 S59=15 S61=0 S63=0 S68=255
  123. OK
  124. AT S45=0 S7=60 S92=1 S111=30 S255=255
  125. OK
  126. AT S58=2 S0=0 S51=6
  127. OK
  128. AT &W
  129. OK
  130. AT &V ~L
  131. WorldBlazer - SA - Version LA5.01 - Active Configuration
  132.  B1  E1  L1  M1  P   Q0  V1  X12  Y0
  133. &C1 &D3 &G0 &J0 &L0 &Q0 &R3 &S0 &T4 &X0
  134. S000=0   S001=0   S002:128 S003=13  S004=10  S005=8   S006=2   S007:60
  135. S008=2   S009=6   S010=14  S011=70  S012=50  S018=0   S025=5   S026=1
  136. S038:5   S041=0   S045=0   S046=0   S047=4   S048=0   S050=0   S051:6
  137. S056=17  S057=19  S058:2   S059:15  S060=0   S061:0   S062=15  S063=0
  138. S064=0   S068=255 S069=0   S090=0   S092:1   S093=8   S094=1   S100=0
  139. S104=0   S105=1   S111:30  S112=1   S151=4   S155=0   S180=2   S181=1
  140. S183=25  S190=1   S191=7   S253=10  S254=255 S255=255
  141. 0:
  142. 1:
  143. 2:
  144. 3:
  145. 4:
  146. 5:
  147. 6:
  148. 7:
  149. 8:
  150. 9:
  151. OK
  152.  
  153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154.  
  155.     You will also need to put a uugetty entry in /etc/inittab for
  156.     incoming connections.
  157.  
  158. t2:23:respawn:/usr/lib/uucp/uugetty -Nt60 -itelebit,conn ttyf2 dx_38400
  159.  
  160.     "telinit q" and "killall uugetty". If you want to test your
  161.     incoming connection, using the wan rlogin to guest@orca.dallas 
  162.     and "cu telno" (where telno is the phone line your modem is 
  163.     connected to) to your machine to see if it works. My machine is in
  164.     Dallas, so add the appropriate area code to telno.
  165.  
  166.     This is necessary for bi-direction connections only. If you only 
  167.     want to dial-out you need only set the port to "off".
  168.  
  169. Step 2: Establish a uucp connection.
  170.  
  171.     Create a device for your modem by putting an appropriate
  172.     entry in /etc/uucp/Devices. My Worldblazer gets the entries:
  173.  
  174. #Type    Line    Line2    Class    Dialer-Token-Pairs
  175. ACU    ttyf2     null     38400     212 x tqb
  176. Direct    ttyf2     -     Any     212 x tqb
  177.  
  178.     The description of the Devices file is in the Chapter 21 of the
  179.     Personal System Administrator guide (available in insight).
  180.     Bascially, ACU keys the line for an Automatic Call Unit. The
  181.     Line should be /dev/ttyf2 for a port 2 connection. Line2 is
  182.     for a 801 type dialer. The Class field keys the modem class,
  183.     in this case a modem class with baud rate at 38.4k. The last
  184.     field specifies the dialer to use. In this case its 212 x tqb.
  185.     "tqb" is a key to the chat script in the /etc/uucp/Dialers
  186.     file. There isn't a WorldBlazer dialer shipped with 5.2 so
  187.     I use the Qblazer dialer.
  188.  
  189.     Create an entry for the system you are dialing up to. Edit
  190.     /etc/uucp/Systems and add two entries similar to the following:
  191.  
  192. #System    Times Type Class Phone       Login
  193. uorca    Any   ACU  38400 12146618514
  194. porca    Any   ACU  38400 12146618514 "" @\r\c ogin: psting ssword: Passwd PPP
  195. direct    Any   Direct 38400
  196.  
  197.     The first entry is a regular dial up. The second entry is for
  198.     an automatic dial up PPP connection. The first field specify
  199.     the remote system. So, when I want to dial up to orca,
  200.     I will use "cu porca". When PPP connects to porca, it expects
  201.     a porca entry in the /etc/uucp/Systems file. The Times
  202.     field specify when the remote computer can be called. The
  203.     key "Any" is self explanatory. Type and class matches the entry 
  204.     in /etc/uucp/Devices file. Phone is the phone number of the
  205.     remote system. The Login field is the response to the remote
  206.     systems's login information. uorca does not have an automatic
  207.     login, so the sender must supply all the pertinent information
  208.     after the connection. In the PPP connection line, the first
  209.     response for a login is "psting" and the request for a password
  210.     is "Passwd PPP". The string PPP is needed for IRIX PPP. Becuase 
  211.     the Systems file contains password information, it should have
  212.     the permissions:
  213.  
  214. -r--------    1 uucp     uucp        1784 Jun  4 14:54 Systems
  215.  
  216.     We'll discuss passwords and logins later. For now, we'll 
  217.     concentrate on establishing a uucp connection. The last entry
  218.     in the example is a direct connection to the modem. This lets
  219.     you bypass any automatic dialing so that you issue modem
  220.     commands.
  221.  
  222.     Make sure there is a dialer for the modem you have chosen. I
  223.     use a WorldBlazer with the tqb dialer. If you have
  224.     a modem that doesn't have a dialer script, you either
  225.     have to write one or try the ones in /etc/uucp/Dialers.
  226.  
  227.     Now test your connection. If you don't have a remote system
  228.     to dial up to you can use the orca for testing.  Type "cu direct", 
  229.     when you get the "Connect" prompt, type "atdt" and return. 
  230.     You'll get a dial tone from the modem.  Press return again to 
  231.     cancel the dt modem command. You'll get an OK prompt. Try to 
  232.     dial SGI's voice mail by issuing the dial command "atdt 18003261020". 
  233.     The modem will respond with "DIALING". Press return to cancel the 
  234.     dial. Type "~." to escape cu. Press return when cu responds with 
  235.     [sting].
  236.  
  237.     Different modems respond differently base on the "result code" 
  238.     setting you have set. Some people my not see the word "DIALING" 
  239.     others may see a numerical result code like "01".
  240.  
  241. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  242. sting#3 cu direct
  243. Connect
  244. atdt
  245. OK
  246. atdt 18003261020
  247. DIALING
  248.  
  249. RRING
  250. ~[sting].
  251. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252.  
  253.  
  254.     Type "cu orca". Your modem should dial up and go thru a
  255.     series of modem speed negotiation. If successful, you'll
  256.     get a login prompt. You can login to the remote system and
  257.     then exit.
  258.  
  259.     If you can't establish a uucp connection, here are some things
  260.     to check for.  At a minimum you should get:
  261.  
  262. sting 4# cu uorca
  263. Trying modem - /dev/ttyf2, acu - /dev/null, calling  x<:  SUCCEEDED
  264.  
  265.         Has the system tried to dial more than once ? Such as:
  266.  
  267. sting 4# cu uorca
  268. Trying modem - /dev/ttyf2, acu - /dev/null, calling  x<:  SUCCEEDED
  269. Trying modem - /dev/ttyf2, acu - /dev/null, calling  x<:  SUCCEEDED
  270.  
  271.         In this case, you are having problems connecting. Is
  272.         the phone number to the remote system correct? Is the 
  273.         line speed from your computer to the modem correct ? 
  274.         If you're using 38400, be consistent. 38400
  275.         should appear in your Devices and Systems file. Also,
  276.         the modem initialization script defaults to 19200. Make
  277.         sure to specify 38400 if you're using 38400. I haven't
  278.         check it, but I don't think that the 4D25 can do 38400.
  279.  
  280.         Is the device locked ? Sometimes a bad "cu" will leave
  281.         the port in a locked state. Check /usr/spool/locks
  282.         for file such as LCK..ttyf2. If you're sure that the
  283.         modem isn't being used, remove this file.
  284.  
  285.         Is the phone line connected ? cu direct and the
  286.         of atdt command should give you a dial tone. If
  287.         it doesn't check your phone connection.
  288.  
  289.  
  290. Step 3:    Set up the PPP connection.
  291.  
  292.     The first thing to do when you set up a PPP connection is to select
  293.     an IP address. It is crucial that you have a network address that is
  294.     different than the one for your ethernet interface. If your
  295.     network with the ethernet is 192.48.147, then your PPP address has
  296.     to be something different. Send email to netnumber@corp.sgi to get
  297.     a new network.
  298.  
  299.     On the remote system you will need a PPP login. Put the following 
  300.     login entry into your /etc/passwd file. This entry instructs your 
  301.     remote system to activate a ppp connection when the the user
  302.     psting logs in. Don't forget to put a passwd in this entry
  303.     ("passwd psting").
  304.  
  305. psting::0:0::/:/usr/etc/ppp
  306.  
  307.     For testing purposes, I have set up a test PPP login on orca. To
  308.     use this PPP login you will need to add the two entries to /etc/hosts.
  309.  
  310. 192.48.147.41    orca
  311. 192.82.199.1    ppptest
  312.  
  313.     Then you'll need to change the name of your machine to ppptest
  314.     by doing a "hostname ppptest". Finally, you'll need to add
  315.     the following to /etc/uucp/Systems.
  316.  
  317. ppptest Any ACU 38400 12146618514 "" @\r\c ogin: ppptest ssword: fugu PPP
  318.  
  319.     Create the PPP configuration file by editing /etc/ppp.conf and
  320.     put in the following line:
  321.  
  322. ppptest quiet remotehost=orca lochost=ppptest
  323.  
  324.     The first field must be the name of the remote system and there
  325.     should be a matching field in the /etc/uucp/Systems file. Subsequent
  326.     fields are PPP options. "quiet" specify a combination of ppp
  327.     in/out mode. "remotehost" specifies the IP address of the remote
  328.     end of the PPP link. "lochost" specifies the IP address of the
  329.     local link. The value for the keyword lochost must be the name
  330.     of your local machine with an appropriate entry in /etc/hosts.
  331.     Other PPP options are listed in the manual page for ppp.
  332.  
  333.     If you're on SGI's WAN, please kill routed and gated. DO NOT
  334.     use my network address after you get pass Step 3. Get a new
  335.     one by sending email to netnumbers@corp.sgi
  336.  
  337. /etc/killall gated routed
  338.  
  339.     Turn on PPP. Type the following to start PPP to ppptest.
  340.  
  341. /usr/etc/ppp -r ppptest &. 
  342.  
  343.     You should be able to ping orca and get a response.  If you get 
  344.     a response, you should be able to "rlogin guest@orca" and 
  345.     do regular network activities from orca to your machine. You
  346.     should notice PPP dialing your remote system when there are
  347.     pending TCP packets. After 30 seconds of inactivity, PPP will
  348.     automatically hang up. I created the necessary startup script
  349.     so that ppp starts up upon bootup. Sample files are located
  350.     on orca.dallas:~hlo/public/ppp
  351.  
  352. Step 4:    Set up routing.
  353.  
  354.     At this point, you'll notice that you can only connect to the remote
  355.     host on the other side of the PPP connection. If you're logged
  356.     on long enough thru the PPP connection, routed will probably
  357.     give you routes to your local network. But as soon as your PPP
  358.     connection goes down, you'll notice that your routes dissapear.
  359.     To combat this, you'll need to use gated.  You will need to have
  360.     a new network for your PPP connection. email netnumbers@corp.sgi.com
  361.     for a new network. You will also need to install the route to the
  362.     Cisco router. Call rod scott @ 412-390-2451.
  363.  
  364.  
  365.                   192.48.147        192.82.199
  366.                   |                 |
  367.     ---WAN--CISCO---(ec0)orca(ppp0)---(ppp0)sting
  368.  
  369.  
  370.     The above is the network topology of my PPP gateway. If you have
  371.     a single machine on the right side of the ppp connection then you'll
  372.     only need to run gated on the near side  of the WAN (orca). If 
  373.     you have multiple machines (such as that shown above), then 
  374.     you'll need to run gated on the far (sting) side as well.  Create 
  375.     the near side gated configuration file /etc/gated.conf with 
  376.     the following entries: You will need to make the proper 
  377.     translation of IP address for your network. The far side machine 
  378.     will have conjugate network IP address.
  379.  
  380. RIP yes supplier
  381. #
  382. # Trace options
  383. traceflags internal external stamp
  384. #
  385. # do not time-out the passive interfaces such as PPP and SLIP
  386. passiveinterfaces 192.82.199.44
  387. #
  388. # broadcast routes for the PPP Interface even when down
  389. net 192.82.199 gateway 192.82.199.44 metric 1 rip
  390. #
  391. # do not waste bandwidth
  392. noripoutinterface 192.82.199.44
  393.  
  394.     Turn off routed and turn on gated.
  395.  
  396. /etc/chkconfig routed off
  397. killall routed
  398. /etc/chkconfig gated on
  399.  
  400.     Put "-t /usr/tmp/gated.log" into /etc/chkconfig/gated.options. Then
  401.     stop/start the network:
  402.  
  403. /etc/init.d/network stop
  404. /etc/init.d/network start
  405.  
  406.     When PPP connects up, it will take a few seconds to propogate
  407.     all the routes. With the routes propogated, you'll be part
  408.     of the network and interact directly to machines on our WAN.
  409.  
  410.     --Howard Lo/Tom Reed
  411.